package com.emr.module.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.emr.module.mapper.OperationMapper;
import com.emr.module.domain.Operation;
import com.emr.module.service.IOperationService;
import com.emr.common.support.Convert;

/**
 * 手术记录 服务层实现
 * 
 * @author emr
 * @date 2019-02-20
 */
@Service
public class OperationServiceImpl implements IOperationService 
{
	@Autowired
	private OperationMapper operationMapper;

	/**
     * 查询手术记录信息
     * 
     * @param id 手术记录ID
     * @return 手术记录信息
     */
    @Override
	public Operation selectOperationById(Integer id)
	{
	    return operationMapper.selectOperationById(id);
	}
	
	/**
     * 查询手术记录列表
     * 
     * @param operation 手术记录信息
     * @return 手术记录集合
     */
	@Override
	public List<Operation> selectOperationList(Operation operation)
	{
	    return operationMapper.selectOperationList(operation);
	}
	
    /**
     * 新增手术记录
     * 
     * @param operation 手术记录信息
     * @return 结果
     */
	@Override
	public int insertOperation(Operation operation)
	{
	    return operationMapper.insertOperation(operation);
	}
	
	/**
     * 修改手术记录
     * 
     * @param operation 手术记录信息
     * @return 结果
     */
	@Override
	public int updateOperation(Operation operation)
	{
	    return operationMapper.updateOperation(operation);
	}

	/**
     * 删除手术记录对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteOperationByIds(String ids)
	{
		return operationMapper.deleteOperationByIds(Convert.toStrArray(ids));
	}
	
}
